WT_DECLARE_WT_MEMBER(1,JavaScriptConstructor,"WPopupWidget",function(g,b,o,p,q){function r(){clearTimeout(h);if(i>0)h=setTimeout(function(){j.hide()},i)}function s(){clearTimeout(h)}function t(){return b.style.display=="hidden"}function k(a){function d(n,c){if(n==c)return true;for(c=c.parentNode;c;c=c.parentNode)if(n==c)return true;return false}a=e.target(a);if(a==document)if(e.WPopupWidget.popupClicked!==null)a=e.WPopupWidget.popupClicked;d(b,a)||j.hide()}jQuery.data(b,"popup",this);var j=this,e=
g.WT,h=null,f=o,i=p,l=null,m=null;this.bindShow=function(a){l=a};this.bindHide=function(a){m=a};this.shown=function(){f&&setTimeout(function(){$(document).bind("click",k)},0);l&&l()};this.show=function(a,d){if(b.style.display!=""){b.style.display="";a&&e.positionAtWidget(b.id,a.id,d);g.emit(b,"shown")}};this.hidden=function(){m&&m();f&&$(document).unbind("click",k)};this.hide=function(){if(b.style.display!="none")b.style.display="none";g.emit(b,"hidden");j.hidden()};this.setTransient=function(a,d){f=
a;i=d;f&&!t()&&setTimeout(function(){$(document).bind("click",k)},0)};$(b).mouseleave(r).mouseenter(s);q&&this.shown()});
